import httpService from './apiIndex'

const apiUrl=import.meta.env.VITE_API_URL; //http://localhost
//console.log('VITE_API_URL: ',apiUrl);


export function getDecryptPhone(url:string,data:wxDecryptPhone) {
  return httpService.post(apiUrl+url, data)
}

export function wxUserLogin(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}


export function getFirstClass(url:string) {
  return httpService.get(apiUrl+url)
}


export function getProducts(url:string) {
  return httpService.get(apiUrl+url)
}

export function getContacts(url:string) {
  return httpService.get(apiUrl+url)
}

export function getProductById(url:string) {
  return httpService.get(apiUrl+url)
}

export function searchProductByKeyWord(url:string) {
  return httpService.get(apiUrl+url)
}


export function getFavourites(url:string) {
  return httpService.get(apiUrl+url)
}


export function addFavourites(url:string) {
  return httpService.get(apiUrl+url)
}


export function deleteFavourites(url:string) {
  return httpService.get(apiUrl+url)
}

export function generateOrder(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}


export function addUserAdress(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}

export function getUserAdress(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}

export function updateAdress(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}

export function deleteAdress(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}

export function orderPay(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}

export function getAllOrders(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}


export function deleteOrders(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}


export function confirmOrder(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}

export function readSwiper(url:string,data:any) {
  return httpService.post(apiUrl+url, data)
}









